$(function(){
	$(document).keypress(function(e){
		if(e.keyCode==13){
			glods=$("#finx").val();
			$.ajax({
				type:"post",
				url:"index.php?m=Admin&c=Arc&a=search",
				data:{glod:glods},
				dataType:'json',
				success:function(phpdata){
				$(".table").find("tr:gt(0)").remove();
				 for(i=0;i<phpdata.length;i++){
				 	table="<tr>";
					table+="<td>"+phpdata[i]['aid']+"</td>";
				    table+="<td>"+phpdata[i]['title']+"</td>";
				    table+="<td>"+phpdata[i]['cname']+"</td>";
				    table+="<td>";
//				    table+="<a href='{{U('Arc/edit',array('aid'=>"+phpdata[i]['aid']+"))}}' class='btn btn-sm btn-warning'>编辑</a>";
				    table += "<a href='index.php?m=Admin&c=Arc&a=edit&aid='+phpdata[i]['aid']+class=\"btn btn-sm btn-warning\">编辑</a>";
//				    table+="<a href='U('Arc/del',array('aid'=>"+phpdata[i]['aid']+")' class='btn btn-sm btn-danger'>删除</a>";
				    table+="</td>";
					table+="</tr>";
					$(".table").append(table);
				 }
					
//					
//					document('<pre>'+phpdata);
//					$(".table").append(table);
				}
			});
			
		}
	})
})
